# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=libblockdev
pkgver=2.28
pkgrel=2
pkgdesc="A library for manipulating block devices"
arch=('x86_64')
url="https://github.com/rhinstaller/libblockdev"
license=('LGPL')
depends=('btrfs-progs' 'dosfstools' 'dmraid' 'gptfdisk' 'libbytesize' 'lvm2' 'mdadm' 'ndctl'
         'parted' 'volume_key' 'xfsprogs' 'kmod' 'libyaml')
makedepends=('autoconf-archive' 'gobject-introspection' 'systemd' 'python')
source=("$pkgname-$pkgver.tar.gz::https://github.com/rhinstaller/libblockdev/archive/$pkgver-1.tar.gz")
sha512sums=('22d594604ea6cefe7ad5567037cdebaabac6289757cef9f3cc02dcb585aaa418d227b107363943029988a2c5689a730a746444ed141e1b7b644b9e3dd69647b6')

build() {
  cd "$srcdir"/$pkgname-$pkgver-1
  ./autogen.sh
  ./configure --prefix=/usr --sysconfdir=/etc --without-lvm_dbus
  make
}

check() {
  cd "$srcdir"/$pkgname-$pkgver-1
  make check
}

package() {
  cd "$srcdir"/$pkgname-$pkgver-1
  make DESTDIR="$pkgdir" install
}
